@(branch: String,
  repository: gitbucket.core.service.RepositoryService.RepositoryInfo,
  pathList: List[String],
  fileName: String,
  content: gitbucket.core.util.JGitUtil.ContentInfo,
  commit: String)(implicit context: gitbucket.core.controller.Context)
@import gitbucket.core.view.helpers
@gitbucket.core.html.main(s"Deleting ${context.path} at ${fileName} - ${repository.owner}/${repository.name}", Some(repository)) {
  @gitbucket.core.html.menu("files", repository){
    <form method="POST" action="@helpers.url(repository)/remove" validate="true">
      <span class="error" id="error-commit"></span>
      <div class="head">
        <a href="@helpers.url(repository)/tree/@helpers.encodeRefName(branch)">@repository.name</a> /
        @pathList.zipWithIndex.map { case (section, i) =>
          <a href="@helpers.url(repository)/tree/@helpers.encodeRefName((branch :: pathList.take(i + 1)).mkString("/"))">@section</a> /
        }
        @fileName
        <input type="hidden" name="fileName" id="fileName" value="@fileName"/>
        <input type="hidden" name="branch" id="branch" value="@branch"/>
        <input type="hidden" name="path" id="path" value="@pathList.mkString("/")"/>
        <input type="hidden" name="commit" id="commit" value="@commit"/>
      </div>
      <table class="table table-bordered diff-outside">
        <tr>
          <th style="font-weight: normal;" class="box-header">
            <span class="monospace">@fileName</span>
            <div class="pull-right align-right">
              <a href="@helpers.url(repository)/blob/@helpers.encodeRefName((branch :: pathList ::: List(fileName)).mkString("/"))" class="btn btn-default btn-sm">View</a>
            </div>
          </th>
        </tr>
        <tr>
          <td>
            <div id="diffText"></div>
            <input type="hidden" id="newText" data-file-name="@fileName" value="">
            <input type="hidden" id="oldText" data-file-name="@fileName" value="@content.content">
          </td>
        </tr>
      </table>
      <div class="panel panel-default issue-comment-box">
        <div class="panel-body">
          <div>
            <strong>Commit changes</strong>
          </div>
          <div class="form-group">
            <input type="text" name="message" class="form-control"/>
          </div>
          <div class="form-group">
            <div class="col-md-12">
              <label class="radio">
                <input type="radio" id="newBranch" name="newBranch" value="false" checked>
                <i class='octicon octicon-git-commit'></i><span>Commit directly to the <strong style="background-color: lightblue; font-family: Consolas">@branch</strong> branch.</span>
              </label>
              <label class="radio">
                <input type="radio" id="newBranch"  name="newBranch" value="true">
                <i class='octicon octicon-git-pull-request'></i><span>Create a <strong>new branch</strong> for this commit and start a pull request.</span>
              </label>
            </div>
          </div>
          <div style="text-align: right;">
            <a href="@helpers.url(repository)/blob/@helpers.encodeRefName((branch :: pathList ::: List(fileName)).mkString("/"))" class="btn btn-default">Cancel</a>
            <input type="submit" id="commitButton" class="btn btn-success" value="Commit changes"/>
          </div>
        </div>
      </div>
    </form>
  }
}
<script type="text/javascript" src="@helpers.assets("/vendors/jsdifflib/difflib.js")"></script>
<link href="@helpers.assets("/vendors/jsdifflib/diffview.css")" type="text/css" rel="stylesheet" />
<script>
$(function(){
  diffUsingJS('oldText', 'newText', 'diffText', 1);
});
</script>
